GBML manual / Strings

string_join

a followed by b - joining two strings. Join more than two by calling it again: string_join(string_join(a, b), c).

Syntax

string_join(a, b) -> string

Arguments

NameType
astring
bstring

Returns

string

Description

a followed by b - joining two strings. Join more than two by calling it again: string_join(string_join(a, b), c).

This is the safe alternative to GBML's own native + (already legal on two strings, but sized off its left-hand side alone and just as able to overflow as any other string-building call). string_join always honors your project's own Longest string setting instead, the same as every other string-building function in this group.

Example

var first = "Ellen";
var last = "Ripley";
var full_name = string_join(string_join(first, " "), last);

On the GBA

The safe alternative to GBML's own native `+` (already legal on two strings, but sized off its LEFT operand alone and just as able to hit the string type's own overflow assert as a bare .append() call would). string_join always honors capacities.maxStringLength instead, the same as every other string-building function in this file.

See also: string_replacestring_trim